<template>
  <el-container v-loading="loading">
    <div class="el-main">

      <el-row>
        <el-col :span="6">
          <div/>
        </el-col>
        <el-col :span="2">
          <div style="display: flex; height: 40px;">
            <img src="@/assets/logo-white.png" />
          </div>
        </el-col>
        <el-col :span="9">
          <div class="container-title">
            车务调车作业安全管控系统
          </div>
        </el-col>
        <el-col :span="7">
          <div/>
        </el-col>
      </el-row>

      <div class="container-top">
        <div class="slide-left">
          <div class="block block-custom">
            <div class="time-count">
              <ShowTime :style-obj="{ color: '#0ebfbf', 'font-size': '28px' }" />
            </div>
          </div>

          <div class="block block-custom">
            <div class="title">一周作业量统计(点击站名筛选)</div>
            <bar-chart />
          </div>
          <div class="block block-custom">
            <div class="title">最近24小时报警数量TOP 10</div>
            <today-alarm-statistics />
          </div>
        </div>
        <div class="slide-main">
          <div class="slide-main-top block block-custom">
            <station-map />
          </div>
          <div class="slide-main-bottom block block-custom">
            <div class="title">报警信息展示</div>
            <alarm-list />
            <event-list />
          </div>
        </div>
        <div class="slide-right">
          <div class="block block-custom">
            <current-train />
          </div>
          <div class=" block block-custom">
            <div class="title">实时报警统计</div>
            <today-alarm-level />
          </div>
          <div class=" block block-custom">
            <div class="title">一周报警信息统计</div>
            <week-word />
          </div>

          <div class="block block-custom">
            <div class="title">最近24小时报警类型统计</div>
            <train-type />
          </div>
        </div>
      </div>
    </div>
  </el-container>
</template>

<script>
require('./echartsThreme')
import touchRipple from '@/directive/touchripple'
import ShowTime from '@/components/ShowTime'
import BarChart from './components/TrainInfoBar'
import TodayAlarmStatistics from '@/views/homePage/components/TodayAlarmStatistics'
import StationMap from './components/StationMap'
import AlarmList from './components/AlarmList'
import EventList from './components/EventList'
import CurrentTrain from './components/TrainCurrentInfo'
import TodayAlarmLevel from '@/views/homePage/components/TodayAlarmLevel'
import WeekWord from './components/WeekWordLine'
import TrainType from './components/TrainType'


import { setInterval, clearInterval } from 'timers'

export default {
  directives: {
    touchRipple
  },
  components: {
    ShowTime,
    BarChart,
    TodayAlarmStatistics,
    StationMap,
    AlarmList,
    EventList,
    CurrentTrain,
    TodayAlarmLevel,
    WeekWord,
    TrainType
  },
  data() {
    return {
      loading: false
    }
  },
  computed: {},
  created() {},
  mounted() {
    const timer = setInterval(() => {
      if (document.readyState == 'complete') {
        this.loading = false
        clearInterval(timer)
      }
    }, 100)
  },
  beforeDestroy() {},
  methods: {}
}
</script>

<style lang="scss" scoped>
.el-container {
  height: 100%;

  .el-main {
    @media screen and (max-width: 1024px) {
      html {
        font-size: 42.66px !important;
      }
    }

    @media screen and (min-width: 1920px) {
      html {
        font-size: 80px !important;
      }
    }
    padding: 10px;
    min-width: 1116px;
    margin-bottom: 10px;
    height: 100%;
  }

  .container-title {
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 10px;
    margin-top: 10px;
    text-align: center;
    letter-spacing: 10px;
    animation: shining 2s infinite alternate;

    // color: white;
    // text-shadow:
    // /* 扩散白光 */ 0 0 7px #fff, 0 0 10px #fff, 0 0 21px #fff, /* 扩散绿光 */ 0 0 42px #0fa, 0 0 82px #0fa, 0 0 92px #0fa, 0 0 102px #0fa, 0 0 151px #0fa;
  }

  @keyframes shining {
    0%,
    18%,
    22%,
    25%,
    53%,
    57%,
    100% {
      text-shadow:
        /* 扩散白光 */ 0 0 20px #fff, 0 0 25px #fff, 0 0 30px #fff, /* 扩散绿光 */ 0 0 42px #0fa, 0 0 82px #0fa, 0 0 92px #0fa, 0 0 102px #0fa, 0 0 151px #0fa;
    }
    20%,
    55% {
      text-shadow: none;
    }
  }

  .container-top {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;

    .time-count {
      overflow: hidden;
      margin-top: 16px;
      margin-bottom: 20px;
      display: flex;
      justify-content: center;

      .date-info {
        float: left;
        padding-right: 0;
      }
    }

    .block {
      margin-top: 14px;
      padding: 0;

      .title {
        height: 32px;
        line-height: 32px;
        color: #fff;
        font-size: 12px;
        text-align: center;
      }
    }

    .slide {
      &-left {
        height: 100%;
        width: 25%;
        padding-right: 10px;
      }

      &-main {
        height: 100%;
        width: 50%;

        .slide-main-top {
          overflow: hidden;
          height: 600px;
          background-color: rgba($color: #f1f1f1, $alpha: 0.2);
        }

        .train-map {
          position: relative;
          width: 100%;
          height: 100%;

          &-img {
            position: absolute;
            top: 0;
            left: 0;
          }
        }
      }

      &-right {
        height: 100%;
        width: 25%;
        padding-left: 10px;
      }
    }
  }
}

.el-col{
  border:1px solid transparent;
}

</style>
